#!/bin/bash
#
# Copyright 2011 Google Inc. All Rights Reserved.
# Author: sdd@google.com (Salvatore Domenick Desiano)
#
# Forget the current issue. Clones remain intact and issue data is
# backed up in the review directory, but the checkout retuns to its
# post-glp-checkout state.
#
# usage: src/scripts/glp-issue-reset

source "$(dirname "${0}")/glp-common.sh"
glp::initialize_checkout_variables "${new_edit_name}"
if [[ "${ISSUE_STATE}" != 'active' ]]; then
    glp::die "review state must be active"
fi
echo "Forgetting issue ${ISSUE_NUMBER}..."
glp::reset_issue_state
echo "Forgotten."
